import React from "react";
import { notFound } from "next/navigation";

import { isValidDayParam } from "@/lib/frontend/params";

export default async function DayLayout({ children, params }) {
	const { day } = await params;

	if (!isValidDayParam(day)) {
		notFound();
	}

	return children;
}
